<?php

	class Form_Login_Create extends ZendX_JQuery_Form {
		
		function __construct($options = null, Zend_Translate $translator = null) {
			
			// construct form element
			parent::__construct($options);
			$this
				->setAction($options['action'])
				->setMethod('post')
				->setAttrib('class', 'form')
				->setAttrib('name', 'create-form')
				->setAttrib('id', 'create-form')
				->setEnctype(Zend_Form::ENCTYPE_MULTIPART)
				->removeDecorator('tag');
				
			// add person name
			$raison = new Zend_Form_Element_Text('raison');
			$raison
				->setAutoInsertNotEmptyValidator(true)
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->addValidator('NotEmpty')
				->setLabel($translator->translate('RAISON SOCIALE') . '*')
				->setDecorators(array('ViewHelper','Description','Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
				
			// add person lastname
			$responsable = new Zend_Form_Element_Text('responsable');
			$responsable
				->setAutoInsertNotEmptyValidator(true)
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->addValidator('NotEmpty')
				->setLabel($translator->translate('RESPONSABLE LEGAL') . '*')
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
				
			// add person email
			$adresse = new Zend_Form_Element_Text('adresse');
			$adresse
				->setAutoInsertNotEmptyValidator(true)
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->addValidator('NotEmpty')
				->setLabel($translator->translate('ADRESSE') . '*')
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
				
			// add person address
			$codePostal = new Zend_Form_Element_Text('codePostal');
			$codePostal
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setAttrib('maxlength', '5')
				->setLabel($translator->translate('CODE POSTAL'). '*')
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
				
			// add person zipcode
			$ville = new Zend_Form_Element_Text('ville');
			$ville
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('VILLE') . '*')
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
				
			// add person city
			$anneeCreation = new Zend_Form_Element_Text('anneeCreation');
			$anneeCreation
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('ANNEE CREA') . '*')
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
				
			
			$statutJuridique = new Zend_Form_Element_Text('statutJuridique');
			$statutJuridique
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('STATUT JURIDIQUE') . '*')
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$CA = new Zend_Form_Element_Text('CA');
			$CA
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('CA'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$siteInternet = new Zend_Form_Element_Text('siteInternet');
			$siteInternet
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('SITE INTERNET'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$numeroDeclaration = new Zend_Form_Element_Text('numeroDeclaration');
			$numeroDeclaration
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('NUMERO DECLARATION'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$lieuDeclaration = new Zend_Form_Element_Text('lieuDeclaration');
			$lieuDeclaration
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('LIEU DECLARATION'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$certification = new Zend_Form_Element_Text('certification');
			$certification
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('CERTIFICATION'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$domaineFormation = new Zend_Form_Element_Text('domaineFormation');
			$domaineFormation
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('DOMAINE FORMATION'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$domaineIntervention = new Zend_Form_Element_Text('domaineIntervention');
			$domaineIntervention
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('DOMAINE INTERVENTION'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$lieuxFormation = new Zend_Form_Element_Text('lieuxFormation');
			$lieuxFormation
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('LIEUX FORMATION'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$moyensDisponibles = new Zend_Form_Element_Text('moyensDisponibles');
			$moyensDisponibles
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('MOYENS DISPO'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$animateurPermanents = new Zend_Form_Element_Text('animateurPermanents');
			$animateurPermanents
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('ANIMATEURS PERMANENTS'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$animateursVacataires = new Zend_Form_Element_Text('animateursVacataires');
			$animateursVacataires
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('ANIMATEURS VACATAIRES'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$sessionsOrganisees = new Zend_Form_Element_Text('sessionsOrganisees');
			$sessionsOrganisees
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('SESSION ORGANISEES'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$stagiairesFormes = new Zend_Form_Element_Text('stagiairesFormes');
			$stagiairesFormes
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('STAGIAIRE FORMES'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$heuresStagiaires = new Zend_Form_Element_Text('heuresStagiaires');
			$heuresStagiaires
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('HEURES STAGIAIRES'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));
			
			// add person fax
			$references = new Zend_Form_Element_Text('references');
			$references
				->addFilter('StringTrim')
				->setAttrib('class', 'textfield')
				->setLabel($translator->translate('REFERENCES'))
				->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', array('tag' => 'span')), array('Label', array('tag' => 'label'))));

				
			$this
				->addElement($raison)
				->addElement($responsable)
				->addElement($adresse)
				->addElement($codePostal)
				->addElement($ville)
				->addElement($anneeCreation)
				->addElement($statutJuridique)
				->addElement($CA)
				->addElement($siteInternet)
				->addElement($numeroDeclaration)
				->addElement($lieuDeclaration)
				->addElement($certification)
				->addElement($domaineFormation)
				->addElement($domaineIntervention)
				->addElement($lieuxFormation)
				->addElement($moyensDisponibles)
				->addElement($animateurPermanents)
				->addElement($animateursVacataires)
				->addElement($sessionsOrganisees)
				->addElement($stagiairesFormes)
				->addElement($heuresStagiaires)
				->addElement($references);
				
				
			$this->addDisplayGroup(
				array(
					'raison',
					'responsable',
					'adresse',
					'codePostal',
					'ville',
					'anneeCreation',
					'statutJuridique',
					'CA',
					'siteInternet',
					'numeroDeclaration',
					'lieuDeclaration',
					'certification',
					'domaineFormation',
					'domaineIntervention',
					'lieuxFormation',
					'moyensDisponibles',
					'animateurPermanents',
					'animateursVacataires',
					'sessionsOrganisees',
					'stagiairesFormes',
					'heuresStagiaires',
					'references'),
				'entreprise',
				array(
					'legend' => $translator->translate('FORM PART 1'))
			);
	}
}